VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ApiCommCtlToolbar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

' ##MODULE_DESCRIPTION This class provides methods and properties for manipulating _
instances of the "Toolbar" windows custom control

Public Enum ToolbarButtonStates
    TBSTATE_CHECKED = &H1
    TBSTATE_PRESSED = &H2
    TBSTATE_ENABLED = &H4
    TBSTATE_HIDDEN = &H8
    TBSTATE_INDETERMINATE = &H10
    TBSTATE_WRAP = &H20
    TBSTATE_ELLIPSES = &H40
    TBSTATE_MARKED = &H80
End Enum

Public Enum ToolbarButtonStyles
    TBSTYLE_BUTTON = &H0
    TBSTYLE_SEP = &H1
    TBSTYLE_CHECK = &H2
    TBSTYLE_GROUP = &H4
    TBSTYLE_CHECKGROUP = (TBSTYLE_GROUP Or TBSTYLE_CHECK)
    TBSTYLE_DROPDOWN = &H8
    TBSTYLE_AUTOSIZE = &H10    ' ##  If set, automatically calculate the width of the button
    TBSTYLE_NOPREFIX = &H20    ' ##  If set, this button should not have accelerator prefix for the &
    TBSTYLE_TOOLTIPS = &H100
    TBSTYLE_WRAPABLE = &H200
    TBSTYLE_ALTDRAG = &H400
    TBSTYLE_FLAT = &H800
    TBSTYLE_LIST = &H1000
    TBSTYLE_CUSTOMERASE = &H2000
    TBSTYLE_REGISTERDROP = &H4000
    TBSTYLE_TRANSPARENT = &H8000
End Enum


Private Type TBBUTTON
    iBitmap As Long
    idCommand As Long
    fsState As Byte
    fsStyle As Byte
    bReserved(2) As Byte
    dwData As Long
    iString As Long
End Type

Public Enum ToolbarMessages
    TB_ENABLEBUTTON = (WM_USER + 1)
    TB_CHECKBUTTON = (WM_USER + 2)
    TB_PRESSBUTTON = (WM_USER + 3)
    TB_HIDEBUTTON = (WM_USER + 4)
    TB_INDETERMINATE = (WM_USER + 5)
    TB_MARKBUTTON = (WM_USER + 6)
    TB_ISBUTTONENABLED = (WM_USER + 9)
    TB_ISBUTTONCHECKED = (WM_USER + 10)
    TB_ISBUTTONPRESSED = (WM_USER + 11)
    TB_ISBUTTONHIDDEN = (WM_USER + 12)
    TB_ISBUTTONINDETERMINATE = (WM_USER + 13)
    TB_ISBUTTONHIGHLIGHTED = (WM_USER + 14)
    TB_SETSTATE = (WM_USER + 17)
    TB_GETSTATE = (WM_USER + 18)
    TB_ADDBITMAP = (WM_USER + 19)
    TB_ADDBUTTONSA = (WM_USER + 20)
    TB_INSERTBUTTONA = (WM_USER + 21)
    TB_ADDBUTTONS = (WM_USER + 20)
    TB_INSERTBUTTON = (WM_USER + 21)
    TB_DELETEBUTTON = (WM_USER + 22)
    TB_GETBUTTON = (WM_USER + 23)
    TB_BUTTONCOUNT = (WM_USER + 24)
    TB_COMMANDTOINDEX = (WM_USER + 25)
    TB_SAVERESTOREA = (WM_USER + 26)
    TB_SAVERESTOREW = (WM_USER + 76)
    TB_CUSTOMIZE = (WM_USER + 27)
    TB_ADDSTRINGA = (WM_USER + 28)
    TB_ADDSTRINGW = (WM_USER + 77)
    TB_GETITEMRECT = (WM_USER + 29)
    TB_BUTTONSTRUCTSIZE = (WM_USER + 30)
    TB_SETBUTTONSIZE = (WM_USER + 31)
    TB_SETBITMAPSIZE = (WM_USER + 32)
    TB_AUTOSIZE = (WM_USER + 33)
    TB_GETTOOLTIPS = (WM_USER + 35)
    TB_SETTOOLTIPS = (WM_USER + 36)
    TB_SETPARENT = (WM_USER + 37)
    TB_SETROWS = (WM_USER + 39)
    TB_GETROWS = (WM_USER + 40)
    TB_GETBITMAPFLAGS = (WM_USER + 41)
    TB_SETCMDID = (WM_USER + 42)
    TB_CHANGEBITMAP = (WM_USER + 43)
    TB_GETBITMAP = (WM_USER + 44)
    TB_GETBUTTONTEXTA = (WM_USER + 45)
    TB_GETBUTTONTEXTW = (WM_USER + 75)
    TB_REPLACEBITMAP = (WM_USER + 46)
    TB_SETINDENT = (WM_USER + 47)
    TB_SETIMAGELIST = (WM_USER + 48)
    TB_GETIMAGELIST = (WM_USER + 49)
    TB_LOADIMAGES = (WM_USER + 50)
    TB_GETRECT = (WM_USER + 51)             ' ##  wParam is the Cmd instead of index
    TB_SETHOTIMAGELIST = (WM_USER + 52)
    TB_GETHOTIMAGELIST = (WM_USER + 53)
    TB_SETDISABLEDIMAGELIST = (WM_USER + 54)
    TB_GETDISABLEDIMAGELIST = (WM_USER + 55)
    TB_SETSTYLE = (WM_USER + 56)
    TB_GETSTYLE = (WM_USER + 57)
    TB_GETBUTTONSIZE = (WM_USER + 58)
    TB_SETBUTTONWIDTH = (WM_USER + 59)
    TB_SETMAXTEXTROWS = (WM_USER + 60)
    TB_GETTEXTROWS = (WM_USER + 61)
    TB_GETOBJECT = (WM_USER + 62)            ' ##  wParam == IID, lParam void **ppv
    TB_GETHOTITEM = (WM_USER + 71)
    TB_SETHOTITEM = (WM_USER + 72)           ' ##  wParam == iHotItem
    TB_SETANCHORHIGHLIGHT = (WM_USER + 73)   ' ##  wParam == TRUE/FALSE
    TB_GETANCHORHIGHLIGHT = (WM_USER + 74)
    TB_MAPACCELERATORA = (WM_USER + 78)     ' ##  wParam == ch, lParam int * pidBtn
    TB_GETINSERTMARK = (WM_USER + 79)        ' ##  lParam == LPTBINSERTMARK
    TB_SETINSERTMARK = (WM_USER + 80)        ' ##  lParam == LPTBINSERTMARK
    TB_INSERTMARKHITTEST = (WM_USER + 81)    ' ##  wParam == LPPOINT lParam == LPTBINSERTMARK
    TB_MOVEBUTTON = (WM_USER + 82)
    TB_GETMAXSIZE = (WM_USER + 83)           ' ##  lParam == LPSIZE
    TB_SETEXTENDEDSTYLE = (WM_USER + 84)     ' ##  For TBSTYLE_EX_*
    TB_GETEXTENDEDSTYLE = (WM_USER + 85)     ' ##  For TBSTYLE_EX_*
    TB_GETPADDING = (WM_USER + 86)
    TB_SETPADDING = (WM_USER + 87)
    TB_SETINSERTMARKCOLOR = (WM_USER + 88)
    TB_GETINSERTMARKCOLOR = (WM_USER + 89)
    TB_MAPACCELERATORW = (WM_USER + 90)
    TB_SETCOLORSCHEME = &H2002   ' ##  lParam is color scheme
    TB_GETCOLORSCHEME = &H2003 ' ##  fills in COLORSCHEME pointed to by lParam
    TB_SETUNICODEFORMAT = &H2005
    TB_GETUNICODEFORMAT = &H2006
End Enum

Public Enum StandardToolbarBitmaps
    STD_CUT = 0
    STD_COPY = 1
    STD_PASTE = 2
    STD_UNDO = 3
    STD_REDO = 4
    STD_DELETE = 5
    STD_FILENEW = 6
    STD_FILEOPEN = 7
    STD_FILESAVE = 8
    STD_PRINTPRE = 9
    STD_PROPERTIES = 10
    STD_HELP = 11
    STD_FIND = 12
    STD_REPLACE = 13
    STD_PRINT = 14
End Enum

Public Enum ViewToolbarBitmaps
    VIEW_LARGEICONS = 0
    VIEW_SMALLICONS = 1
    VIEW_LIST = 2
    VIEW_DETAILS = 3
    VIEW_SORTNAME = 4
    VIEW_SORTSIZE = 5
    VIEW_SORTDATE = 6
    VIEW_SORTTYPE = 7
    VIEW_PARENTFOLDER = 8
    VIEW_NETCONNECT = 9
    VIEW_NETDISCONNECT = 10
    VIEW_NEWFOLDER = 11
    VIEW_VIEWMENU = 12
End Enum

Public Enum HistoryToolbarBitmaps
    HIST_BACK = 0
    HIST_FORWARD = 1
    HIST_FAVORITES = 2
    HIST_ADDTOFAVORITES = 3
    HIST_VIEWTREE = 4
End Enum

Private Const TBN_FIRST = -700

Public Enum ToolbarNotificationMessages
     TBN_GETBUTTONINFOA = (TBN_FIRST - 0)
     TBN_GETBUTTONINFOW = (TBN_FIRST - 20)
     TBN_BEGINDRAG = (TBN_FIRST - 1)
     TBN_ENDDRAG = (TBN_FIRST - 2)
     TBN_BEGINADJUST = (TBN_FIRST - 3)
     TBN_ENDADJUST = (TBN_FIRST - 4)
     TBN_RESET = (TBN_FIRST - 5)
     TBN_QUERYINSERT = (TBN_FIRST - 6)
     TBN_QUERYDELETE = (TBN_FIRST - 7)
     TBN_TOOLBARCHANGE = (TBN_FIRST - 8)
     TBN_CUSTHELP = (TBN_FIRST - 9)
     TBN_DROPDOWN = (TBN_FIRST - 10)
     TBN_GETOBJECT = (TBN_FIRST - 12)
     TBN_HOTITEMCHANGE = (TBN_FIRST - 13)
     TBN_DRAGOUT = (TBN_FIRST - 14)            ' ##  this is sent when the user clicks down on a button then drags off the button
     TBN_DELETINGBUTTON = (TBN_FIRST - 15)     ' ##  uses TBNOTIFY
     TBN_GETDISPINFOA = (TBN_FIRST - 16)       ' ##  This is sent when the  toolbar needs  some display information
     TBN_GETDISPINFOW = (TBN_FIRST - 17)       ' ##  This is sent when the  toolbar needs  some display information
     TBN_GETINFOTIPA = (TBN_FIRST - 18)
     TBN_GETINFOTIPW = (TBN_FIRST - 19)
End Enum

'\\ Member variables
Private mHWND As Long

Public Property Get ClassName() As String

    ClassName = "ToolbarWindow32"
    
End Property

